home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr01 / halcn305.zip / TUTOR12.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-21  |  1KB  |  46 lines

  1. program Tutor12;
  2. {$N+,E+}          {Required for floating point number handling}
  3. uses
  4.    CRT,
  5.    GSOB_DBF,
  6.    GSOB_DBS,
  7.    GSOB_VAR;
  8. var
  9.    MyFile  : GSO_dBHandler;
  10.    Ch      : char;
  11.  
  12. procedure ShowTheMemo;
  13. var
  14.    i,
  15.    ml   : integer;
  16. begin
  17.    MyFile.MemoGet('COMMENTS');
  18.    ml := MyFile.MemoLines;
  19.    if ml > 20 then ml := 20;    {trim to fit the screen}
  20.    if ml <> 0 then
  21.       for i := 1 to ml do
  22.          writeln(MyFile.MemoGetLine(i))
  23.       else writeln('[ EMPTY ]');
  24.    writeln;
  25. end;
  26.  
  27. begin
  28.    ClrScr;
  29.    MyFile.Init('TUTOR2');
  30.    MyFile.Open;
  31.    MyFile.MemoWidth(75);     {sets width of the memo line.  Default is 50}
  32.    MyFile.GetRec(Top_Record);
  33.    while not MyFile.File_EOF do
  34.    begin
  35.       ClrScr;
  36.       writeln(MyFile.FieldGet('LASTNAME'),', ',
  37.               MyFile.FieldGet('FIRSTNAME'));
  38.       ShowTheMemo;
  39.       write('Press any key....');
  40.       Ch := ReadKey;
  41.       writeln;
  42.       MyFile.GetRec(Next_Record);
  43.    end;
  44.    MyFile.Close;
  45. end.
  46.